package day0711;

import java.util.Arrays;
import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) {
        double[]   num=new double[6];
        Scanner s=new Scanner(System.in);
        //1.输入6个int数据
        for (int i = 0; i < num.length ; i++) {
            int b=s.nextInt();
            num[i]=b;
        }
        double rs=getAvg(num);
        System.out.println(rs);
    }


    private static double getAvg(double[] num) {
        Arrays.sort(num);//升序

        //2.算累加和
        double d=0;
        for (int i = 1; i <num.length-1; i++) {
            d=d+num[i];
        }

        //3.打印平均分
        System.out.println( d/ (num.length-2) );
        return d/ (num.length-2);
    }
}
